﻿@model PagedList<PaymentApply>
<table class="table">
    <thead>
        <tr>
            <th>
                银行账单
            </th>
            <th>
                订单编号
            </th>
            <th>
                客户编号
            </th>
            <th>
                客户名
            </th>
            <th>
                收款人
            </th>
            <th>
                认款金额
            </th>
            <th>
                申请人
            </th>
            <th style="width:80px">
                申请时间
            </th>
            <th style="width:40px">
                状态
            </th>
            <th>
                审核人
            </th>
            <th style="width:80px">
                审核时间
            </th>
            <th style="width:80px">
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@Html.DetailsLink(item.Id, item.BankData.Assiginment)
                </td>
                <td>@Html.DisplayFor(m => item.OrderNum)
                </td>
                <td>@item.CustomerCode
                </td>
                <td>@item.CustomerName
                </td>
                <td>@Html.DisplayFor(m => item.BankData.Payer)
                </td>
                <td>@item.Amount
                </td>
                <td>
                    @BindDropDownList.GetUserName(item.ApplyMan)
                </td>
                <td>@Html.DisplayFor(m => item.ApplyTime)
                </td>
                <td>@BindDropDownList.ApprovalName(item.Status)
                </td>
                <td>
                    @BindDropDownList.GetUserName(item.Approver)
                </td>
                <td>@Html.DisplayFor(m => item.ApprovalTime)
                </td>
                <td>
                    @if (item.Status < 2 && User.IsInRole("FINACE"))
                    { 
                        @Html.ShortcutLink("同意", "Agree", new { item.Id })
                        @Html.ShortcutLink("拒绝", "Reject", new { item.Id })
                        
                    }
                    @if (item.Status == 1 && item.ApplyMan == User.Identity.Name)
                    { 
                        @Html.ShortcutLink("取消", "Cancel", new { item.Id })
                    }
                    @Html.EditLink(item.Id, condition: item.IsCanEdit(User.Identity.Name))
                </td>
            </tr>
        }
    </tbody>
</table>
@Html.CommonPager(Model, ViewData["SearchModel"])
